package com.huawei.zyb.taskManager.interfaces.rest;

import com.huawei.zyb.taskManager.application.task.TaskApplicationService;
import com.huawei.zyb.taskManager.application.task.dto.CreateTaskCommand;
import com.huawei.zyb.taskManager.application.task.dto.TaskDTO;
import com.huawei.zyb.taskManager.application.task.dto.UpdateTaskCommand;
import com.huawei.zyb.taskManager.domain.shared.BusinessException;
import com.huawei.zyb.taskManager.domain.task.valueobject.TaskLevel;
import com.huawei.zyb.taskManager.domain.task.valueobject.TaskStatus;
import com.huawei.zyb.taskManager.domain.task.valueobject.TaskPriority;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import jakarta.validation.Valid;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Positive;
import jakarta.validation.constraints.Size;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.DecimalMax;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

/**
 * 任务控制器
 */
@Controller
public class TaskController {
    
    /**
     * 任务管理页面
     */
    @GetMapping("/tasks")
    public String tasksPage() {
        return "task-management";
    }
}

/**
 * 任务REST API控制器
 */